package com.planw.beetl.model;

import java.util.ArrayList;
import java.util.List;

public class TreeNode<T> {

  private T value;

  private List<TreeNode<T>> children;

  public TreeNode(T t) {

    this.value = t;
    this.children = new ArrayList<>();
  }

  public TreeNode() {

    this.children = new ArrayList<>();
  }

  public T getValue() {

    return value;
  }

  public void setValue(T value) {

    this.value = value;
  }

  public List<TreeNode<T>> getChildren() {

    return children;
  }

  public void setChildren(List<TreeNode<T>> children) {

    this.children = children;
  }

  public void addChild(TreeNode<T> node) {

    this.children.add(node);
  }

}
